import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import DeviceManage from './views/device/DeviceManage.vue'
import DeviceQuery from './views/device/DeviceQuery.vue'
import UserManage from './views/user/UserManage.vue'
import LatestData from './views/monitor/LatestData.vue'
import DangerData from './views/monitor/DangerData.vue'
import MonitorData from './views/monitor/MonitorData.vue'
import echarts from './views/charts/echarts.vue'

let routes = [
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        //leaf: true,
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '设备管理',
        iconCls: 'fa el-icon-menu',
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/device-manage', component: DeviceManage, name: '设备信息管理' },
            { path: '/device-query', component: DeviceQuery, name: '设备信息查询' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户管理',
        iconCls: 'fa el-icon-menu',
        children: [
            { path: '/user-manage', component: UserManage, name: '用户信息管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据监控',
        iconCls: 'fa el-icon-menu',
        children: [
            { path: '/latest-data', component: LatestData, name: '最新记录查询' },
            { path: '/monitor-data', component: MonitorData, name: '记录查询' },
            { path: '/danger-data', component: DangerData, name: '超标记录查询' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据分析',
        iconCls: 'fa el-icon-menu',
        children: [
            { path: '/echarts', component: echarts, name: '数据折线图' }
        ]
    }
];

export default routes;